package com.fingard.dsp.bank.reqrespobj.auth;

import java.util.HashMap;

import com.fingard.dsp.bank.reqrespobj.ReqRespHeader;
import com.fingard.dsp.bank.reqrespobj.RequestBase;
import com.fingard.dsp.bank.reqrespobj.auth.detail.ReqAuthDetail;
import com.fingard.xml.XmlTextReader;

public class ReqAuth extends RequestBase {
	public ReqAuthDetail authDetail;
	public XmlTextReader xmlReader;
	public HashMap<String,String> reqHashMap;

	public ReqAuth(XmlTextReader p_xmlReader, ReqRespHeader p_header) throws Exception {
		reqHeader = p_header;
		xmlReader = p_xmlReader;

		if (xmlReader.read(PATH_Detail)) {
			authDetail = new ReqAuthDetail(xmlReader.readedXElement);
		} else {
			throw new Exception("不存在节点：" + PATH_Detail);
		}
	}
	
	public ReqAuth(HashMap<String, String> p_reqHashMap, ReqRespHeader p_header) throws Exception{
		reqHeader = p_header;
		reqHashMap = p_reqHashMap;
		
		authDetail = new ReqAuthDetail(p_reqHashMap);
	}
}
